/* 增强样式 - 美化admin模块界面 */

/* 头部样式优化 */
.adminui-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  
  .logo-bar {
    position: relative;
    
    .logo {
      filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
      transition: transform 0.3s ease;
      
      &:hover {
        transform: scale(1.05);
      }
    }
    
    .app-name {
      background: linear-gradient(45deg, #fff, #f0f0f0);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
      font-weight: 600;
      letter-spacing: 0.5px;
      margin-right: 15px;
    }
    
    .app-version {
      position: absolute;
      top: -8px;
      right: -25px;
      background: rgba(255, 255, 255, 0.2);
      color: white;
      font-size: 10px;
      padding: 2px 6px;
      border-radius: 10px;
      backdrop-filter: blur(10px);
      border: 1px solid rgba(255, 255, 255, 0.3);
    }
  }
  
  .header-actions {
    display: flex;
    align-items: center;
    margin-right: 20px;
    
    .action-btn {
      color: rgba(255, 255, 255, 0.8);
      margin: 0 5px;
      border-radius: 6px;
      transition: all 0.3s ease;
      
      &:hover {
        color: white;
        background: rgba(255, 255, 255, 0.1);
        transform: translateY(-2px);
      }
      
      .el-icon {
        font-size: 16px;
      }
    }
  }
  
  .nav {
    li {
      position: relative;
      border-radius: 8px;
      margin: 0 5px;
      padding: 8px 16px;
      transition: all 0.3s ease;
      border: 1px solid transparent;
      
      &:hover {
        background: rgba(255, 255, 255, 0.15);
        border-color: rgba(255, 255, 255, 0.2);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
      }
      
      &.active {
        background: rgba(255, 255, 255, 0.2);
        border-color: rgba(255, 255, 255, 0.3);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
        
        &::after {
          content: '';
          position: absolute;
          bottom: -2px;
          left: 50%;
          transform: translateX(-50%);
          width: 20px;
          height: 3px;
          background: linear-gradient(45deg, #fff, #f0f0f0);
          border-radius: 2px;
        }
      }
      
      .el-icon {
        margin-right: 8px;
        font-size: 16px;
        transition: transform 0.3s ease;
      }
      
      &:hover .el-icon {
        transform: scale(1.1);
      }
    }
  }
}

/* 侧边栏样式优化 */
.aminui-side {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.08);
  border-right: 1px solid #e2e8f0;
  
  .adminui-side-top {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom: none;
    position: relative;
    overflow: hidden;
    padding: 15px 20px;
    
    &::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
      opacity: 0.3;
    }
    
    .side-top-content {
      position: relative;
      z-index: 1;
      text-align: center;
      
      h2 {
        color: white;
        font-weight: 600;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        margin: 0 0 5px 0;
        font-size: 18px;
      }
      
      .side-top-subtitle {
        color: rgba(255, 255, 255, 0.8);
        font-size: 12px;
        font-weight: 400;
        text-transform: uppercase;
        letter-spacing: 1px;
      }
    }
  }
  
  .adminui-side-bottom {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-top: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    
    &:hover {
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      color: white;
      transform: scale(1.05);
      box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    }
    
    .el-icon {
      transition: transform 0.3s ease;
    }
    
    &:hover .el-icon {
      transform: rotate(180deg);
    }
  }
}

/* 菜单样式优化 */
.el-menu {
  border: none;
  background: transparent;
  
  .el-menu-item, .el-sub-menu__title {
    margin: 4px 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    
    &::before {
      content: '';
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
      width: 0;
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      transition: width 0.3s ease;
      z-index: 0;
    }
    
    &:hover {
      background: rgba(102, 126, 234, 0.1);
      transform: translateX(4px);
      box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
      
      &::before {
        width: 4px;
      }
    }
    
    &.is-active {
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      color: white;
      box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
      
      &::before {
        width: 4px;
        background: white;
      }
    }
    
    .el-icon {
      margin-right: 12px;
      transition: transform 0.3s ease;
    }
    
    &:hover .el-icon {
      transform: scale(1.1);
    }
  }
  
  .el-sub-menu {
    .el-menu {
      background: rgba(248, 250, 252, 0.8);
      margin: 0 8px;
      border-radius: 8px;
      
      .el-menu-item {
        margin: 2px 4px;
        border-radius: 6px;
        
        &:hover {
          background: rgba(102, 126, 234, 0.1);
        }
        
        &.is-active {
          background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
          color: white;
        }
      }
    }
  }
}

/* 顶部工具栏优化 */
.adminui-topbar {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  border-bottom: 1px solid #e2e8f0;
  
  .left-panel, .right-panel {
    padding: 0 20px;
  }
}

/* 标签页优化 */
.adminui-tags {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  
  ul {
    padding: 0 16px;
  }
  
  li {
    margin: 4px 2px 0 0;
    border-radius: 6px 6px 0 0;
    border: 1px solid #e2e8f0;
    border-bottom: none;
    background: #f8fafc;
    transition: all 0.3s ease;
    
    &:hover {
      background: #e2e8f0;
      transform: translateY(-2px);
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    &.active {
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      border-color: #667eea;
      color: white;
      box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
      
      a {
        color: white;
      }
      
      &::after {
        background: transparent;
      }
    }
    
    a {
      padding: 8px 16px;
      font-weight: 500;
      transition: all 0.3s ease;
    }
    
    i {
      transition: all 0.3s ease;
      
      &:hover {
        background: rgba(0, 0, 0, 0.1);
        transform: scale(1.1);
      }
    }
  }
}

/* 主内容区域优化 */
.adminui-main {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  padding: 20px;
}

/* 响应式优化 */
@media (max-width: 768px) {
  .adminui-header {
    .nav {
      display: none;
    }
    
    .logo-bar span {
      font-size: 16px;
    }
  }
  
  .aminui-side {
    width: 100%;
    position: fixed;
    z-index: 1000;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    
    &.show {
      transform: translateX(0);
    }
  }
}

/* 动画效果 */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.adminui-header,
.aminui-side,
.adminui-topbar,
.adminui-tags {
  animation: slideIn 0.5s ease-out;
}

/* 滚动条美化 */
.adminui-side-scroll {
  &::-webkit-scrollbar {
    width: 6px;
  }
  
  &::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
  }
  
  &::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
    
    &:hover {
      background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    }
  }
}

/* 用户栏优化 */
.adminui-header .user-bar {
  .panel-item {
    border-radius: 8px;
    transition: all 0.3s ease;
    
    &:hover {
      background: rgba(255, 255, 255, 0.15) !important;
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
  }
  
  .user label {
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  }
}

/* 折叠状态优化 */
.aminui-side.isCollapse {
  .adminui-side-top {
    h2 {
      display: none;
    }
  }
  
  .adminui-side-bottom {
    &:hover {
      transform: scale(1.1);
    }
  }
}

/* 暗色主题支持 */
@media (prefers-color-scheme: dark) {
  .aminui-side {
    background: linear-gradient(180deg, #1a202c 0%, #2d3748 100%);
    border-right-color: #4a5568;
    
    .adminui-side-top {
      background: linear-gradient(135deg, #4c51bf 0%, #553c9a 100%);
    }
    
    .adminui-side-bottom {
      background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
      border-top-color: #4a5568;
    }
  }
  
  .adminui-topbar,
  .adminui-tags {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    border-color: #4a5568;
  }
  
  .adminui-main {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
  }
}
